//
//  NewFeatureCollectionCell.swift
//  01-微博项目搭建
//
//  Created by Adolph on 15/5/17.
//  Copyright (c) 2015年 Adolph. All rights reserved.
//

import UIKit

class NewFeatureCollectionCell: UICollectionViewCell {
    @IBOutlet weak var iconView: UIImageView!
    
    @IBOutlet weak var startBtn: UIButton!
    
    var imageIndex: Int = 0
    
    
    func setImageWithIndex(imageIndex: Int){
        // 设置图像
        iconView.image = UIImage(named: "new_feature_\(imageIndex + 1)")
        startBtn.hidden = true
    }
    
    // 显示启动按钮
    func showStartButton() {
        startBtn.hidden = false
        startBtn.transform = CGAffineTransformMakeScale(0, 0)
        
        UIView.animateWithDuration(1.2, animations: { () -> Void in
            self.startBtn.transform = CGAffineTransformMakeScale(1.0, 1.0)
            }) { (_) -> Void in
                println("OK")
        }
    }
    @IBAction func startClick() {
        println(__FUNCTION__)
    }
}